package com.ourteam.education.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-09-22 15:15:29
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class ClassTeacherRelateBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.education.dao.ClassTeacherRelate classTeacherRelate;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(classTeacherRelate);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.education.dao.IClassTeacherRelateDAO.Id);
		
														
				
																
		mappedDaoFields.put("classId",com.ourteam.education.dao.IClassTeacherRelateDAO.ClassId);
		
										
				
																				
		mappedDaoFields.put("teacherId",com.ourteam.education.dao.IClassTeacherRelateDAO.TeacherId);
		
						
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public ClassTeacherRelateBean() {
		super();
	    		
		this.classTeacherRelate = new com.ourteam.education.dao.ClassTeacherRelate();
                
	}
	
		
	public ClassTeacherRelateBean(com.ourteam.education.dao.ClassTeacherRelate classTeacherRelate) {
		super();
	
		this.classTeacherRelate = classTeacherRelate;
		
	}
		
		
		
    	
	public com.ourteam.education.dao.ClassTeacherRelate convertToClassTeacherRelate(){
		return this.classTeacherRelate;
	}
	
	public com.ourteam.education.dao.ClassTeacherRelate convertTo(){
		return this.classTeacherRelate;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.classTeacherRelate.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.classTeacherRelate.setId(id);
	}
		
							
		
		
					
			
		
	/**
	 * Get classId
	 * 
	 * @return long
	 */
	public long getClassId(){
		return (long) this.classTeacherRelate.getClassId();
	}
	
	/**
	 * Set classId
	 * 
	 * @parameter long
	 */
	public void setClassId(long classId){
		
		this.classTeacherRelate.setClassId(classId);
	}
		
					
		
		
							
			
		
	/**
	 * Get teacherId
	 * 
	 * @return long
	 */
	public long getTeacherId(){
		return (long) this.classTeacherRelate.getTeacherId();
	}
	
	/**
	 * Set teacherId
	 * 
	 * @parameter long
	 */
	public void setTeacherId(long teacherId){
		
		this.classTeacherRelate.setTeacherId(teacherId);
	}
		
			
		
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ClassTeacherRelateBean) == false) {
            return false;
        } // end if

        ClassTeacherRelateBean other = (ClassTeacherRelateBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.education.dao.ClassTeacherRelate tempClassTeacherRelate = other.convertToClassTeacherRelate();
        
        if(tempClassTeacherRelate == null || this.classTeacherRelate == null){
        	isEqual = false;
        }
        else if(tempClassTeacherRelate == this.classTeacherRelate || tempClassTeacherRelate.equals(this.classTeacherRelate) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static ClassTeacherRelateBean[] toArray(com.ourteam.education.dao.ClassTeacherRelate[] aClassTeacherRelates){
		
		return toArray(aClassTeacherRelates,null);
	}
	
	public static ClassTeacherRelateBean[] toArray(com.ourteam.education.dao.ClassTeacherRelate[] aClassTeacherRelates , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aClassTeacherRelates)){
		 	return new ClassTeacherRelateBean[0];
		 }
		 
		 int length = aClassTeacherRelates.length;
		 
		 ClassTeacherRelateBean[] beans = new ClassTeacherRelateBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new ClassTeacherRelateBean(aClassTeacherRelates[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aClassTeacherRelates[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}